package com.ljh.mybatis.controller;

import com.ljh.mybatis.model.UserInfo;
import com.ljh.mybatis.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: Themberfue
 * @date: 2025/3/2 10:22
 * @description:
 */
@RequestMapping("/user")
@RestController
public class UserInfoController {
    @Autowired
    UserInfoService userInfoService;

    @RequestMapping("/getAllUser")
    List<UserInfo> getAllUser() {
        return userInfoService.getAllUser();
    }


    @RequestMapping("/getUserInfoById")
    UserInfo getUserInfoById(Integer id) {
        return userInfoService.getUserInfoById(id);
    }
}
